USER_SRC_OBJS	:= DateTime.o
USER_TEST_OBJS	:= test.o
GTEST_LIBRARIES	:= gtest_main.a

USER_DIR 		:= .

include ../gtest/gtest.mk
USER_OBJS		:= $(USER_SRC_OBJS) $(USER_TEST_OBJS)
GTEST_LIBRARIES	:= $(addprefix $(GTEST_LIB)/, $(GTEST_LIBRARIES)) 

# Builds a sample test.  A test should link with either gtest.a or
# gtest_main.a, depending on whether it defines its own main()
# function.
#temp = $(USER_DIR)/$(patsubst %.o, %.cpp, $(USER_SRC_OBJS))

$(USER_SRC_OBJS) : %.o : %.cpp 
	$(CXX) $(GTEST_INCLUDE) $(CXXFLAGS) -c $(USER_DIR)/$<
	
$(USER_TEST_OBJS): %.o : %.cpp
	$(CXX) $(GTEST_INCLUDE) $(CXXFLAGS) -c $(USER_DIR)/$<

$(TESTS) : $(USER_OBJS) $(GTEST_LIBRARIES)
	$(CXX) $(GTEST_INCLUDE) $(CXXFLAGS) $(USER_OBJS) $(GTEST_LIBRARIES) -o $@ -lpthread 
